import request from '@/utils/request'
const BASE='/personnel/belong'
export default {
  //根据劳务公司id查询人员数量
  personCount(id){
    return request({
        url: `${BASE}/personCount/${id}`,
        method: 'get',
    })
  },
  //根据劳务公司id查询劳务公司人员
  corporation(currentPage,openAccount,pageSize,serviceCorporationId,status){
    return request({
        url: `${BASE}/service_corporation/person`,
        method: 'get',
        params:{currentPage,openAccount,pageSize,serviceCorporationId,status}
    })
  },
  //设置班组长
  setTeamLeader(personId,teamId){
    // console.log(personId);
    // console.log(teamId);
    return request({
        url: `${BASE}/setTeamLeader`,
        method: 'post',
        params:{ person_id:personId,team_id:teamId }
    })
    },
  //根据班组id查询班组人员
  team(data){
    return request({
        url: `${BASE}/team/person`,
        method: 'get',
        params:data
    })
  },
  selectPersonNamesByPersonIds(personIds){
    return request({
      url: '/personnel/person/selectPersonNamesByPersonIds',
      method: 'post',
      data:personIds
    })
  }
}
